/*************************************************************************
    > File Name: AccountItem.h
    > Author: skylon
    > Site: blog.csdn.net/tcm_zhangpeng 
    > Created Time: 2016年05月15日 星期日 14时04分12秒
 ************************************************************************/

#include<iostream>
#include<string>
#include<fstream>
#include<vector>
using namespace std;

class AccountItem	//	store a account's information
{
private:
	string m_Anumber;	//	accounts
	string m_Password;	//	passwd
	string m_Name;	//	name
	double m_Balance;	//	balance
public:
	AccountItem();	//	constructr
	AccountItem(string Anumber, string Password, string Owener, const double Balance);
	void Display();	//	display account's information
	void Read(ifstream &s);	//	read account's information
	void Write(ofstream &s);	//	modify account's information
	short CheckNumber(string Anumber);	//	check whether the account exist
	string GetNumber();	//	get account's number
	string GetPassword();	//	get account's passwd
	void DeductBalance(double pay);	//	modify account's balance
	double GetBalance();	//	get account's balance
	string GetName();	//	get account's name
	short IsNull();
};



